﻿using System;
using System.Web.UI;


namespace mojoPortal.Web.RS.SBM
{
    public partial class RSManageIssue : RSBasePage
    {
        int _companyid = 0;
        int _workorderid = 0;
        int _issueid = 0;

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["workorderid"] != null)
                _workorderid = Convert.ToInt32(Request.QueryString["workorderid"].ToString());
            if (Request.QueryString["issueid"] != null)
                _issueid = Convert.ToInt32(Request.QueryString["issueid"].ToString());

            if (!Page.IsPostBack)
            {
                InitializeReadyServicePage();

                RSUserIdentity userIdentity = GetRSUserIdentity();
                _companyid = userIdentity.RSCompanyId;

                if (_companyid > 0)
                {
                    if (Request.QueryString["action"] == "add")
                        SetRSPageHeader("Add Issue");
                    else
                        SetRSPageHeader("Edit Issue");

                    if (_workorderid > 0)
                    {
                        bool hasData = ucIssueControl.LoadIssueDataByID(_companyid, _workorderid, _issueid);
                    }
                }
            }
        }



    }
}